package com.solo.strategy.bean;

import com.solo.strategy.in.FlyBehavior;
import com.solo.strategy.in.QuackBehavior;

public abstract class Duck {
	FlyBehavior flyBehavior;
	QuackBehavior quackBehavior;
	public abstract void display();
	public void performFly(){
		flyBehavior.fly();
	}
	
	public void performQuack(){
		quackBehavior.quack();
	}
	
	public void setFlyBehavior(FlyBehavior fly){
		flyBehavior = fly;
	}
	
	public void setQuackBehavior(QuackBehavior quack){
		quackBehavior = quack;
	}
}
